package org.groovymud.utils;

import java.util.List;
import java.util.Random;

public class Dice {

    int numberOfDice;
    int dieMax;

    public Dice(int numberOfDice, int dieMax) {
        this.numberOfDice = numberOfDice;
        this.dieMax = dieMax;
    }

    public Dice(String str, List mixedList) {
        System.out.println("mixedList" + mixedList);
    }

    public int roll() {
        int roll = 0;
        Random rnd = new Random(System.currentTimeMillis());
        for (int x = 0; x < numberOfDice; x++) {
            roll += rnd.nextInt(dieMax) + 1;
        }
        return roll;
    }
}
